#pragma once
#include <QGraphicsItem>

class EntryItem;

class UnfoldButton :
	public QGraphicsItem
{
public:
	const static int RADIUS = 6;

	UnfoldButton(EntryItem* );
	~UnfoldButton(void);
	void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
	QRectF boundingRect() const;

protected:
	void hoverEnterEvent ( QGraphicsSceneHoverEvent* );
	void hoverLeaveEvent ( QGraphicsSceneHoverEvent* );
	void mousePressEvent(QGraphicsSceneMouseEvent* );

private:
	EntryItem* _parent;
	int _x;
	int _y;
	bool _isHover;
};
